﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Model
{

    [MetadataType(typeof(Sys_Enterprise_Metadata))]
    [DisplayName("企业信息")]
    public partial class Sys_Enterprise
    {
        public Sys_Enterprise()
        {
            this.Id = Guid.NewGuid();
            this.Validity = DateTime.Now.AddYears(1);
        }

        public class Sys_Enterprise_Metadata
        {
            [ScaffoldColumn(false)]
            public System.Guid Id { get; set; }

            [DisplayName("企业名称")]
            public string EnterpriseName { get; set; }

            [DisplayName("最大用户数")]
            public int MaxUsers { get; set; }

            [DisplayName("有效期至")]
            public DateTime Validity { get; set; }

            [DisplayName("绑定域名")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public string BindingDomain { get; set; }

        }
    }
}
